#ifndef TCP_SOCKET_IMPL_H
#define TCP_SOCKET_IMPL_H

#include "encapsulation/TcpSocket.h"

class TcpSocketImplPrivateData;
class Timer;
class TcpSocketImpl: public TcpSocket
{
public:
    explicit TcpSocketImpl();

    ~TcpSocketImpl() override;

    void read(const char *buf, size_t size) override;

    void onConnect(bool status) override;

    void disconnected() override;

    void onClose() override;

public:
    static void reConnectTimer(void *data);

private:
    Timer *timer;
};

#endif //TCP_SOCKET_IMPL_H
